package com.jdrx.sw.sewage.dao;

import com.jdrx.sw.sewage.beans.entity.StationPO;
import com.jdrx.sw.sewage.beans.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 站点信息表，存放站点名称，地址，经纬度等相关信息DAO（sewage_station）
 * Created by generator on 2020-10-12.
 */
@Mapper
public interface StationDAO {

    StationPO findById(Long stationId);

    List<StationPO> selectStationList(@Param("dataNode") String dataNode);

    StationVO selectStationByNetNum(@Param("netNum") String netNum,
                                    @Param("dataNode") String dataNode);

    StationVO selectStationAlarmTypeById(@Param("stationId") Long stationId,
                                         @Param("dataNode") String dataNode,
                                         @Param("useStatus") Integer useStatus);

    List<GISStationVO> selectGisStationList(List<Long> dutyUserStationIds);

    GISStationInfoVO selectStationById(Long stationId);

    List<DeviceIotVO> selectCSAndJSValue(@Param("stationId") Long stationId,
                                         @Param("csq") String csq,
                                         @Param("ljll") String ljll,
                                         @Param("cod") String cod,
                                         @Param("tp") String tp,
                                         @Param("tn") String tn,
                                         @Param("nhn3h") String nhn3h,
                                         @Param("ss") String ss,
                                         @Param("Y") String Y,
                                         @Param("PH") String PH);

    List<DeviceIotAppVO> selectCSAndJSValueApp(@Param("stationId") Long stationId,
                                         @Param("Y") String Y);

    List<GroupDeviceDisplayVO> selectProcessunitByStationId(@Param("stationId") Long stationId,
                                                            @Param("dataNode") String dataNode,
                                                            @Param("processunitId") Long processunitId);

    List<DeviceDateDisplayVO> selectPoinValuesByStationId(@Param("stationId") Long stationId,
                                                          @Param("dataNode") String dataNode,
                                                          @Param("s") String s,
                                                          @Param("p") String p,
                                                          @Param("procShow") Integer procShow);

    List<DeviceDateDisplayVO> selectPoinValuesByStationIdAndpId(@Param("stationId") Long stationId,
                                                                @Param("processunitId") Long processunitId,
                                                                @Param("dataNode") String dataNode,
                                                                @Param("s") String s,
                                                                @Param("p") String p);

    CommandDevVO selectPoinValuesByStationIdAndpIdAndgDid(@Param("stationId") Long stationId,
                                                          @Param("processunitId") Long processunitId,
                                                          @Param("gatherDevPointId") Long gatherDevPointId);

    List<DeviceDateDisplayVO> selectPoinPasByStationId(@Param("stationId") Long stationId,
                                                       @Param("key") String key);

    List<DeviceDateDisplayVO> findPlcLogicByStationId(@Param("stationId") Long stationId,
                                                      @Param("key") Integer key);

    int updateByCode(StationPO record);

    int insert(StationPO record);

    List<StationNameVO> selectStationNameList(List<Long> dutyUserStationIds);

    List<StationPO> list(StationPO record);

    StationStatisticsVO statistics(@Param("name") String name, @Param("stationIds") List<Long> stationIds);

    int update(StationPO record);

    LoginStationVO getLoginStation();

    StationVO findStationById(@Param("stationId") Long stationId);

    StationVO findStationByCode(@Param("code") String code);

    StationPO selectStation();
}